<?php
//接口类
interface aa {
	
	 function show () {}

	 function catagroy () {}
}

//策略类
class man implements aa {

	public static function show () {
		echo 'men';
	}	

	public static function catagroy () {
	
		echo 'men_catagroy';
	}
}

// 策略类
class women implements aa {

	public static function show () {
	
		echo 'women';
	}

	public static function catagroy () {
	
		echo "women_catagroy";
	}
} 

//调用类
class diaoyong {

	protected static $b;
	
	public static function index () {
	
		$this->b->show();
		$this->b->catagroy();
	}

	public static function setb (aa $b) {
		$this->b = $b
	}
	

}

$aa = new aa;
if($_GET['man']) {
	$all = new man();
} else {
	$all = new women();
}

$aa->setb($all);
$aa->index();
